github.com/0chain/gosdk@v1.17.11/docs/uml/list object.puml (about)

     1  @startuml
     2  participant "<size:20><&terminal></size> ./zbox list" as cli
     3  collections gosdk
     4  collections blobber
     5  
     6  alt not empty remotepath
     7  cli -> gosdk: GetAllocation(allocationID)
     8  cli -> gosdk: ListDir(remotepath)
     9  
    10  gosdk -> gosdk: check initialized allocation
    11  gosdk -> gosdk: check valid path
    12  gosdk -> gosdk: create a new map of list result
    13  
    14  group for each blobber (blobber, bidx)
    15  gosdk -> blobber: call http request to get list info
    16  alt successful status code
    17  blobber --> gosdk: return to map of list result
    18  end
    19  end
    20  
    21  group for each element of list result (list result, idx)
    22  gosdk -> gosdk: get result from element
    23  
    24  group for each childrend of element(list result, idx)
    25  gosdk -> gosdk: increase consensus
    26  gosdk -> gosdk: check threshold consensus
    27  end
    28  
    29  end
    30  
    31  alt not empty result
    32  gosdk -> cli: return result
    33  end
    34  
    35  else not empty authticket
    36  cli -> gosdk: GetAllocationFromAuthTicket(authticket)
    37  cli -> gosdk: InitAuthTicket(authticket)
    38  cli -> gosdk: ListDirFromAuthTicket(authticket, lookuphash)
    39  
    40  gosdk -> gosdk: check initialized allocation
    41  gosdk -> gosdk: get auth ticket from authticket
    42  gosdk -> gosdk: check valid hash
    43  gosdk -> gosdk: create a new map of list result
    44  
    45  group for each blobber (blobber, bidx)
    46  gosdk -> blobber: call http request to get list info
    47  alt successful status code
    48  blobber --> gosdk: return to map of list result
    49  end
    50  end
    51  
    52  group for each element of list result (list result, idx)
    53  gosdk -> gosdk: get result from element
    54  
    55  group for each childrend of element(list result, idx)
    56  gosdk -> gosdk: increase consensus
    57  gosdk -> gosdk: check threshold consensus
    58  end
    59  
    60  end
    61  
    62  alt not empty result
    63  gosdk -> cli: return result
    64  end
    65  end
    66  @enduml